using System;
using System.Xml;
using System.Collections.Generic;

namespace RoverStudio.Common.SysDiagram
{

	public abstract class Component
	{
		private ComponentState state;
		
		public abstract void Start();

		public abstract void Stop();

		public event StateChangedEventHandler StateChanged;

		public ComponentState State
		{
			get
			{
				return this.state;
			}
			
			protected set
			{
				ComponentState oldState = this.state;
				this.state = value;
				if (StateChanged!=null)
					StateChanged(this, new StateChangedEventArgs(oldState, this.state));
			}
		}
	}
}
